<?php
defined('_JEXEC') or die;

class KetnoiControllerRepair extends JControllerLegacy
{
	public function save()
	{
		$model = $this->getModel("Repair");
		$result = $model->save();
		$isQuickCreate = $this->input->getBool("quickcreate");
		if(!$result["success"] || $isQuickCreate)
		{
			echo json_encode($result);
			exit();
		}
		$id = $result["id"];
		JRequest::setVar("id",$id);	
		parent::display();
	}	
	
	function loadlinhkien()
	{
		$model = $this->getModel("Repair");
		$result = $model->loadlinhkien();
		echo json_encode($result);
		exit();
	}
	
	/*
	function delete()
	{
		$model = $this->getModel("Vendor");
		$model->delete();
		echo true;
		exit();
	}*/
}
